home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gwuada_9.zip / VARS.C < prev    next >
C/C++ Source or Header  |  1993-07-27  |  5KB  |  216 lines

  1. #define INIT(v) =v 
  2.  
  3. #include "hdr.h"
  4.  
  5.  
  6.  
  7.   double    ADA_MIN_REAL INIT((-79228162514264337593543950336.0));/* - 2.0**96 */
  8.   double    ADA_MAX_REAL INIT(79228162514264337593543950336.0);/* 2.0**96 */
  9.   int    ADA_REAL_DIGITS INIT(6);
  10.   int    cdebug2;
  11.  
  12.   Declaredmap declared_all[4];    /* array of standard declareds */
  13.   int    full_others;  /* a boolean */
  14.   int    fold_context; /* a boolean */
  15.   Node current_node;
  16.   Node OPT_NODE;    /*initialized in sem0 */
  17.  
  18.  
  19.   Declaredmap base_declared[4];
  20.   Symbol base_declared_symbols[4];
  21.   Tuple scope_st;            /* stack of lexical scopes */
  22.   Tuple has_return_stk;        /* stack to track return statements */
  23.   Tuple newtypes;            /* list of type declaration code to be */
  24.   Tuple lab_seen;            /* set of labels in procedure . */
  25.   Tuple current_instances;    /* stack for recursive instantiation check */
  26.  
  27.   Symbol scope_name;        /* unique name for each scope */
  28.   char *unit_name;        /* compilation unit information */
  29.   Tuple all_vis;            /* Modules whose visibility is required */
  30.  
  31.   Tuple open_scopes;        /* nest of currently open scopes, from inner */
  32.   Tuple used_mods;        /* packages appearing in a use clause */
  33.   Tuple vis_mods;    /* list of package names visible in this unit*/
  34.  
  35.   int    noop_error;
  36.  
  37.   Set non_local_names;        /* To collect non_local references in each subp. */
  38.  
  39.   int    out_context;        /* Signals valid appearance of out parameter.  */
  40.  
  41.   Symbol
  42. symbol_and,
  43. symbol_andthen,
  44. symbol_any,
  45. symbol_any_id,
  46. symbol_array_type,
  47. symbol_ascii,
  48. symbol_assign,
  49. symbol_boolean,
  50. symbol_boolean_type,
  51. symbol_callable,
  52. symbol_character,
  53. symbol_character_type,
  54. symbol_constrained,
  55. symbol_constraint_error,
  56. symbol_daccess,
  57. symbol_dfixed,
  58. symbol_discrete_type,
  59. symbol_divfx,
  60. symbol_duration,
  61. symbol_eq,
  62. symbol_exception,
  63. symbol_float,
  64. symbol_ge,
  65. symbol_gt,
  66. symbol_in,
  67. symbol_incomplete,        /* incomplete, for incp_types */
  68. symbol_integer,
  69. symbol_le,
  70. symbol_left,
  71. symbol_limited,            /* limited for priv_types, incp_types */
  72. symbol_limited_private,        /* cf. symbol_limited */
  73. symbol_long_float,
  74. symbol_long_integer,
  75. symbol_lt,
  76. symbol_main_task_type,
  77. symbol_mulfx,
  78. symbol_natural,
  79. symbol_none,
  80. symbol_not,
  81. symbol_ne,
  82. symbol_notin,
  83. symbol_null,
  84. symbol_numeric,
  85. symbol_numeric_error,
  86. symbol_or,
  87. symbol_order_type,
  88. symbol_orelse,
  89. symbol_overloaded,
  90. symbol_positive,
  91. symbol_private,            /* for priv_types, incp_types */
  92. symbol_program_error,
  93. symbol_right,
  94. symbol_short_integer,
  95. symbol_short_integer_base,
  96. symbol_standard,
  97. symbol_standard0,
  98. symbol_storage_error,
  99. symbol_system_error,
  100. symbol_string,
  101. symbol_string_type,
  102. symbol_system,
  103. symbol_tasking_error,
  104. symbol_undef,
  105. symbol_universal_dfixed,
  106. symbol_universal_fixed,
  107. symbol_universal_integer,
  108. symbol_universal_integer_1,
  109. symbol_universal_real,
  110. symbol_unmentionable,
  111. symbol_xor;
  112.  
  113.   Symbol 
  114. symbol_universal_type,
  115. symbol_integer_type,
  116. symbol_real_type,
  117. symbol_composite_type,
  118. symbol_equal_type;
  119.  
  120.  
  121.   Symbol
  122. symbol_addu,  /* +u */
  123. symbol_subu,  /* -u */
  124. symbol_abs,  /* abs */
  125. symbol_add,  /* + */
  126. symbol_sub,  /* - */
  127. symbol_mul,  /* * */
  128. symbol_div,  /* / */
  129. symbol_mod,  /* mod */
  130. symbol_rem,  /* rem */
  131. symbol_exp,  /* ** */
  132. symbol_cat,  /* & */
  133. symbol_cat_cc, /* &cc */
  134. symbol_cat_ac, /* &ac */
  135. symbol_cat_ca, /* &ca */
  136. symbol_modi,  /* modi */
  137. symbol_remi,  /* remi */
  138. symbol_addui,  /* +ui */
  139. symbol_subui,  /* -ui */
  140. symbol_absi,  /* absi */
  141. symbol_addi,  /* +i */
  142. symbol_subi,  /* -i */
  143. symbol_muli,  /* *i */
  144. symbol_divi,  /* /i */
  145. symbol_addufl,    /* +ufl */
  146. symbol_subufl,    /* -ufl */
  147. symbol_absfl,  /* absfl */
  148. symbol_addfl,  /* +fl */
  149. symbol_subfl,  /* -fl */
  150. symbol_mulfl,  /* *fl */
  151. symbol_divfl,  /* /fl */
  152. symbol_addufx,    /* +ufx */
  153. symbol_subufx,    /* -ufx */
  154. symbol_absfx,  /* absfx */
  155. symbol_addfx,  /* +fx */
  156. symbol_subfx,  /* -fx */
  157. symbol_mulfxi,    /* *fxi */
  158. symbol_mulifx,    /* *ifx */
  159. symbol_divfxi,    /* /fxi */
  160. symbol_mulfli,    /* *fli */
  161. symbol_mulifl,    /* *ifl */
  162. symbol_divfli,    /* /fli */
  163. symbol_expi,  /* **i */
  164. symbol_expfl;  /* **fl */
  165.  
  166.   Tuple unary_sig;
  167.   Tuple binary_sig; /* TBSL: to be initialized in sem0*/
  168.  
  169.   int num_predef_units; /* number of units in predef.ada */
  170.  
  171.   int errors INIT(FALSE); /* flag if errors are present*/
  172.  
  173.   int adaval_overflow; 
  174.   char *FILENAME;
  175.   FILE *MSGFILE INIT(stdout);
  176.   Tuple init_nodes;
  177.   Tuple init_symbols; /* tuple of symbols created by sem initialization*/
  178.   Tuple unit_nodes;
  179. #ifdef TBSL
  180.   int unit_nodes_n INIT(0);
  181. #endif
  182.   char *PREDEFNAME; /* name of predef file */
  183.   char *AISFILENAME;
  184.   int lib_option INIT(FALSE);
  185.   int new_library INIT(FALSE); /* set if creating library */
  186.   struct unit *pUnits[MAX_UNITS+1];
  187.   Tuple lib_stub;
  188.   Tuple stub_info;
  189.  
  190.   int seq_node_n INIT(0); /* number of nodes allocated */
  191.   Tuple seq_node; /* tuple of allocated nodes*/
  192.   int seq_symbol_n INIT(0);/* number of symbols allocated*/
  193.   Tuple seq_symbol;    /* tuple of allocated symbols */
  194.  
  195.   int unit_number_now INIT(0);
  196.   int unit_numbers INIT(0);
  197.   int empty_unit_slots INIT(0);
  198.  
  199.   int trapns INIT(0),trapnu INIT(0),trapss INIT(0),trapsu INIT(0);
  200.  
  201.   Tuple aisunits_read;
  202.  
  203.   Nodemap node_map;
  204.   Symbol OPT_NAME; /* This is to symbols what OPT_NODE is to nodes*/
  205.  
  206.   int    compiling_predef INIT(0); /* set if we are compiling predef */
  207.  
  208.   char *string_any_id  INIT("any_id"); 
  209.   char *string_ok  INIT("ok");
  210.   char *string_ds  INIT("$D$");
  211.   int power_of_2_accuracy; 
  212.   int power_of_2_power;
  213.   Rational power_of_2_small;
  214.   Set stubs_to_write;
  215.   Tuple NOT_CHOSEN;
  216.